home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / send.zip / SEND.DOC < prev    next >
Text File  |  1986-01-03  |  26KB  |  542 lines

  1.  
  2.  
  3.  
  4.  
  5.                       DOCUMENTATION FOR SEND.COM   Ver 1.6
  6.  
  7.  
  8.       INTRODUCTION
  9.             SEND.COM is an enhanced version of the ECHO command, ideal
  10.       for sending escape sequences to the printer or screen.  The
  11.       documentation is primarily a tutorial on ECHO, SEND and redirection
  12.       of output.  If you already feel expert on ECHO and redirection, you
  13.       can skip to the final SUMMARY section to get a short manual on
  14.       SEND.
  15.             SEND, its source code, documentation, and demonstration files
  16.       are copyright 1985 by Howard Rumsey and Barry Simon.  They are
  17.       placed in public domain with one restriction and may be used for any
  18.       purpose including commercial use.  It is recomended that the the
  19.       full set of files be distributed together.  The sole restriction
  20.       is that the two files with copyright notices must be distributed
  21.       with these copyright notices.
  22.             Version 1.5 differs from the unnumbered version 1.0 by
  23.       including discussion of redirection of send through COMMAND.COM and
  24.       additional $<Cap Letters> commands.
  25.             SEND.COM was written by Howard Rumsey.  The source file is
  26.       found on the disk together with several demonstration files:
  27.             MONODEMO.BAT
  28.             COLORDEM.BAT
  29.             KEYRD.BAT
  30.             KEYOFF.BAT
  31.             PRINTDEM.BAT
  32.       The first four require you to have installed ANSI.SYS via your
  33.       CONFIG.SYS file.  The first two illustrate the use of SEND with
  34.       monochrome and color monitors respectively.  Keyrd will redefine
  35.       your F9 key to mean "dir" followed by <Enter> and F10 to mean "cls"
  36.       followed by <Enter>.  Keyoff returns the keys to their original
  37.       meaning.  The final batch file will illustrate the use of SEND if
  38.       you have an IBM graphics or compatible printer attached to LPT1.
  39.       This batch file can be run on either monitor, but if you have a
  40.       color monitor, you should run it with that as tne active monitor.
  41.       The demonstration files and this documentation were written by
  42.       Barry Simon.
  43.             The following files are also included:
  44.             BOLDPRN.BAT: Uses SEND to printout a file of your choice in
  45.                 boldprint on an IBM printer.  Type in the command
  46.                     "boldprn 'filename'"
  47.             TRIAL.TXT: Used in printdem to illustrate boldprn.bat
  48.             ANSISYS.ART: An article by B. Simon, which first appeared in
  49.                 the CAPITOL PC Monitor which describes the use of
  50.                 ANSI.SYS.
  51.       The batch files have numerous remarks embedded in them and you
  52.       should copy them to your printer.  You should note that you
  53.       couldn't do that if these batch files had used ECHO and embedded
  54.       escape characters rather than SEND!
  55.             These programs are hereby placed in the public domain.
  56.  
  57.  
  58.       Documentation for SEND.COM                          page 1
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.             Comments on this program can be sent to:
  68.                Barry Simon                      Howard Rumsey
  69.                Caltech 253-37         or        Caltech 158-79
  70.                Pasadena, CA 91125               Pasadena, CA 91125
  71.                                                 CompuServe 72426,3722
  72.             This documentation can be printed out by turning on your
  73.       printer, making sure that the paper is properly aligned and typing
  74.       "copy send.doc prn" at a DOS prompt.  If you have an IBM graphics
  75.       printer, you can get an even nicer copy by typing "boldprn send.doc"
  76.       at the DOS prompt.
  77.  
  78.  
  79.       INSTALLING SEND.COM
  80.             Some effort has been expended to keep SEND.COM under 512
  81.       bytes so it takes up only one sector if you have a floppy based
  82.       system.  In that case, you need to copy SEND.COM to your utility
  83.       disk.  SEND is not resident so the disk needs to be present
  84.       whenever SEND is invoked.  On a hard disk system copy SEND.COM to a
  85.       directory which is one of your DOS path search directories set by
  86.       the PATH command.
  87.  
  88.  
  89.       USING ECHO
  90.             You may be used to exploiting ECHO in your batch files but
  91.       may not be aware that it can be invoked from the DOS command line.
  92.       If that is the case, type in at the DOS prompt:
  93.             echo hello
  94.       You need to also hit <Enter> but I won't keep saying that.  The
  95.       response is amusing but not useful.  Next try:
  96.             echo hello > prn
  97.       More interesting!  Still not so useful but at least if you ever
  98.       want to use your printer as a typewriter (why anyone would want to
  99.       do this in preference to using a real word processor is beyond me!)
  100.       you can do it yourself without needing a BASIC program which does
  101.       precisely that.
  102.             Now try
  103.             echo <Ctrl G>
  104.       where "<Ctrl G>" means to hit a "control-G", that is to depress the
  105.       <Ctrl> key and strike the G and try
  106.             echo <Ctrl G> > prn
  107.       These are decidedly more interesting and you may even think of some
  108.       uses for them in batch files!
  109.             Next try turning off your printer, carefully aligning your
  110.      printer paper, turning your printer back on and typing
  111.             echo <Ctrl L> > prn
  112.       <Ctrl L> is the command to send a "top of form" to your printer but
  113.       if you look carefully you will discover that more than a top of
  114.       form was sent to the printer.  ECHO automatically inserts a
  115.       carriage return-line feed pair (CR-LF) to the end of any line so
  116.  
  117.  
  118.       Documentation for SEND.COM                          page 2
  119.  
  120.  
  121.  
  122.  
  123.  
  124.       your last command first sent a top of form but then advanced the
  125.       paper one additional line.  Annoying, isn't it?
  126.             Next try:
  127.             echo <Esc>
  128.       and
  129.             echo <Ctrl [>
  130.       (Escape and Control-[ are the same).  This doesn't do what you
  131.       might hope.  <Esc> is interpreted by DOS as a desire on your part
  132.       to abort the present command and thus you cannot use ECHO at the
  133.       command line to send an <Esc> to either the screen or your printer.
  134.       This is unfortunate since ANSI.SYS allows you to do all
  135.       sorts of nice things if you send the proper "escape sequences" to
  136.       the screen and many printers can be told to turn on boldface or
  137.       other neat things by sending escape sequences to them.  You can
  138.       send such sequences to the printer by using some word processors
  139.       (even EDLIN (ugh!) if you use its <Ctrl V> feature) to make a file
  140.       with embedded escape characters which you can copy to your printer.
  141.       But you then need to have these files around and you have files
  142.       with embedded control characters which you may have trouble
  143.       printing out or sending over a modem.
  144.             SEND is intended to remedy these defects of ECHO:
  145.             1. It does not terminate line in a CR-LF combination; one can
  146.               add such a pair "by hand".
  147.             2. Typing "send ^G" is equivalent (except for the lack of a
  148.               CR-LF) to typing "echo <Ctrl G>" so one need not fill files
  149.               with control characters.
  150.             3. Typing "send ^[E > prn" will send a <Esc>E to the printer
  151.               thereby turning on "emphasized" print.
  152.       In addition, as will be explained, SEND supports the PROMPT $-
  153.       characters.
  154.  
  155.  
  156.       SEND: CONTROL CHARACTERS
  157.             SEND works much like ECHO but if the string to be echoed
  158.       includes the caret (<Shift 6> which appears as ^), different rules
  159.       apply.  SEND will replace ^a by the character <Ctrl A> (ASCII 1),
  160.       etc.  ^ followed by any letter is replaced by the corresponding
  161.       control character whether the letter is upper case or lower case.
  162.       The remaining control characters:
  163.             ^@=ASCII 0
  164.             ^[=ASCII 27 (1B Hex)=<Esc>
  165.             ^\=ASCII 28 (1C Hex)
  166.             ^]=ASCII 29 (1D Hex)
  167.             ^^=ASCII 30 (1E Hex)
  168.             ^_=ASCII 31 (1F Hex)
  169.       may be included by following a caret by the appropriate symbol.
  170.       Obviously, ^[, the es